package com.by.controller;

import com.by.bean.params.SupplierQuery;
import com.by.common.bean.PageBean;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.SupplierService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "供应商管理")
@RestController
@RequestMapping("/api/supplier")
public class SupplierController extends BaseController {
    @Autowired
    SupplierService supplierService;
    @PostMapping("/supplier/list")
    @ApiOperation("供应商列表")
    public ResultBean<PageBean> query(@RequestBody SupplierQuery query){
        PageBean bean=supplierService.query(query.toMap());
        return success("供应商列表",bean);
    }
}
